Skip to content

Conversation

iaguirre88
Copy link
Contributor

I realized that the example for prewalk/2 is a bit confusing since some people might assume that 5 + 3 * 7 is transformed to 5 * 3 + 7 while in reality it's transformed into something like 5 * (3 + 7) because the tree shape is not changed.

I think by showing the previous and new AST in the example can be more helpful for the developer.

I also added an example for prewalk/3 and included some references to these functions in the postwalk/2 and postwalk/3

Co-authored-by: Eksperimental <eksperimental@autistici.org>
@josevalim josevalim merged commit 3176951 into elixir-lang:main May 29, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@iaguirre88 iaguirre88 deleted the update-prewalk-example branch May 30, 2022 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants